package cn.z2huo.demo.spring.cloud.alibaba.sentinel.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * <p>
 *
 * @author z2huo
 */
@RestController
public class SentinelResourceTestController {

    @SentinelResource("sentinel-resource-test")
    @GetMapping("/test")
    public String test() {
        return "hello world " + LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME);
    }

}
